<template>
  <Header></Header>
	
	<!-- 社会责任 -->
	<div class="features segments" style="padding-bottom: 0px;">
	    <div class="container">
			<div class="section-title">
			    <h3></h3>
			</div>
	        <div class="row" style="margin-top: 50px;">
	            <div class="col s4" v-for="(item,index) in dataList" :key="index" style="margin-bottom: 20px;">
	                <div class="content">
						<router-link :to="`/column?id=${item.id}`">
							<i class="fas fa-tv"></i>
							<h6>{{item.title}}</h6>
						</router-link>
	                </div>
	            </div>
	           
	        </div>
	       
	    </div>
	</div>
	
	
	
  <Footer></Footer>
</template>


<script setup>
	import api from "@/api/index"
	let dataList=ref([])
	const router = useRouter();
	onMounted(() => {
		//console.log(toRaw(router.currentRoute.value.query.classId))
		var classId=toRaw(router.currentRoute.value.query.classId)
	      getList(classId)
	});
	onBeforeMount(()=>{
		
	});
	const getList=(classId)=>{
		var url='?id='+classId
		api.getChildAndParentById(url).then(res => {
			
			dataList.value=res.data.data[0].list
			
		})
	}
	
</script>

<style>
	
	
</style>